/*
Autor: Alexander Savochkin, 2010
New BSD License
*/

#pragma once

#include <map>
#include <string>

#include "IOperatedOutput.h"

using std::map;
using std::string;

namespace SRCLF {
namespace IO {

	class OperatedOutputFactory
	{
	public:
		virtual ~OperatedOutputFactory() {};
		virtual IOperatedOutput* newInstance(const string& name, const Configuration& config) = 0;
	};

	template<class TOperatedOutput>
	class DefaultOperatedOutputFactory : public OperatedOutputFactory
	{
	public:
		virtual IOperatedOutput* newInstance(const string& name, const Configuration& config)
		{
			return new TOperatedOutput(name, config);
		}
	};

} //namespace IO
} //namespace SRCLF
